<%-- 
    Document   : jurnal2
    Created on : Nov 15, 2012, 10:57:48 AM
    Author     : Ellis
--%>


<%@page import="bean.Siswa"%>
<%@page import="bean.koneksi"%>

<%@page import="java.sql.ResultSet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>

<%
    bean.koneksi conn = new bean.koneksi();
    bean.Siswa siswa=new bean.Siswa();
%>
<html>
    <head> <script language=javascript> var rev = "fwd"; 
        function titlebar(val) { var msg  = "PENCARIAN | SMA HARAPAN BANGSA"; 
            var res = " "; var speed = 100; var pos = val;  
            msg = " "+msg+" "; var le = msg.length; 
            if(rev == "fwd"){  if(pos < le){  pos = pos+1;  
                    scroll = msg.substr(0,pos);  document.title = scroll;  
                    timer = window.setTimeout("titlebar("+pos+")",speed);  }  
                else{  rev = "bwd";  timer = window.setTimeout("titlebar("+pos+")",speed);  } } 
            else{  if(pos > 0){  pos = pos-1;  
                    var ale = le-pos;  scrol = msg.substr(ale,le);  
                    document.title = scrol;  timer = window.setTimeout("titlebar("+pos+")",speed);  }  
                else{  rev = "fwd";  timer = window.setTimeout("titlebar("+pos+")",speed);  } } }  titlebar(0); 
        </script>
        <link href="http://img98.imageshack.us/img98/9617/image3cr0.gif" rel='SHORTCUT ICON'/>
        <style>
            #main{
                font-weight: bold;
                padding-left:0px;
                padding-right:0px;
                margin-top: 0px;
                margin-left:170px;
                margin-right:170px;
                margin-bottom:0px;
            }

            #menuhor{
                list-style-type: disc;
                margin: 0;
                padding: 0;

                float: left;
            }
            #menuhor li {
                margin: 0;
                padding: 0 ;
                float: left;

            }
            #menuhor a {
                float: none;
                width: 150px;
                text-align: center;
                color: #FFF;
                text-decoration: none;
                padding: 2px;
                line-height: 2;
                margin-bottom: 3px;
            }
            #menuhor a:hover{

                background: yellow;
            }

            #teks{
                font-family: Arial;
                font-size: 13px;


            </style>
        </head>

        <body bgcolor="grey">
            <script language="javascript">
                function show_hari()
                {
                    //membuat variabel bertipe array untuk nama hari
                    var NamaHari = new Array("Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat",
                    "Sabtu");
                    //membuat variabel bertipe array untuk nama bulan
                    var NamaBulan = new Array("Januari", "Februari", "Maret", "April", "Mei",
                    "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
                    var sekarang = new Date();
                    var HariIni = NamaHari[sekarang.getDay()];
                    var BulanIni = NamaBulan[sekarang.getMonth()];
                    var tglSekarang = sekarang.getDate();
                    var TahunIni = sekarang.getFullYear();
                    document.write(HariIni + ", " + tglSekarang + " " + BulanIni + " " + TahunIni);
                }
            </script>

            <div id="main">
                <img alt="cover" src="gambar/tes.jpg" width="1000" height="200">

                <br>
                </body>
                <div id="menuhor"style="position:absolute;right:7px;left:470px;top:170px;">
                    <a href="home.html"><m style="color:black;font-family:Tahoma;font-size:20px">  HOME </a></m>
                        <a href="daftar.jsp"><m style="color:black;font-family:Tahoma;font-size:20px">| PENDAFTARAN </a></m>
                        <a href="jurnal.jsp"><m style="color:black;font-family:Tahoma;font-size:20px">| JURNAL NILAI</a></m>           
                        <a href="tentang.jsp"><m style="color:black;font-family:Tahoma;font-size:20px">| TENTANG SEKOLAH</a></m>
                    </div>
                    <font style="font-family: Arial; color:white"><script>show_hari();</script>
                    | <font id="demo"></font>
                    <script>
                        var myVar=setInterval(function(){myTimer()},1000);

                        function myTimer()
                        {
                            var d=new Date();
                            var t=d.toLocaleTimeString();
                            document.getElementById("demo").innerHTML=t;
                        }
                    </script>

                    <br> <br>
                    <tr>
                        <td></td>  <td></td>   <td></td>

                        <jsp:useBean id="input" scope="session" class="bean.Siswa"/>
                        <jsp:setProperty name="input" property="*" />
                    <H1><font color="blue">Download </font></H1>
                    <br>
                    </body>
                    <div id="java">
                        <td></td>  <td></td>   <td></td>

                        <font id="teks">
                        <font style="font-family: Arial; font-size: 15px;color: aquamarine;"> Pengumuman Hasil Akhir PPDB </font>
                    <br><br>
                    Diberitahukan pengumuman Hasil Seleksi Akhir untuk PPDB SMA/SMK Reguler Tahap II,
                    <br>
                    dapat diakses disitus ini pada tanggal 20 Desember 2012 jam 15:00 WIB. 
                    <br>
                    Bagi Calon Peserta Didik Baru yang diterima Silahkan Lakukan "DAFTAR ULANG" Di sekolah 
                    <br>
                    Tanggal 23 Desember 2012 jam 08:00 s.d 14:00 WIB. dengan membawa Bukti Verfikasi pendaftaran dan
                    <br>
                    Copy SKHUN yang telah dilegalisir. 
                    <br><br>
                    *catatan:
                    <br>
                    Jika bukti verifikasi hilang, silahkan minta tolong kepada operator sekolah untuk mencetak 
                    ulang bukti verifikasi pendaftaran tersebut.
                    <br><br>
                    Demikian untuk diperhatikan
                    Admin PPDB
                    </font>

                    <hr>


                    <%
                        try {



                            //searching p = new searching();
                            String nis = request.getParameter("nis");
                            //String query2 = "select * from pendaftaran where nama = '" + p.getNama_siswa() + "'";
                            String query2 = "select * from pendaftaran where nis = '" + nis + "'";
                            java.sql.Statement statement = conn.getConnection().createStatement();
                            java.sql.ResultSet result2 = statement.executeQuery(query2);
                    %>



                    <%
                    siswa.queryname() ;
                        while (result2.next()) {
                    %>
                    <tr>
                        Nama : <td align="center"><% out.println(result2.getString("nama"));%></td><br>
                    Alamat : <td align="center"><% out.println(result2.getString("alamat"));%></td><br>
                    Asal Sekolah : <td align="center"><% out.println(result2.getString("asalsekolah"));%></td><br>
                    Tanggal Lahir : <td align="center"><% out.println(result2.getString("tanggallahir"));%></td><br>
                    Jenis Kelamin : <td align="center"><% out.println(result2.getString("jeniskelamin"));%></td><br>
                    Agama : <td align="center"><% out.println(result2.getString("agama"));%></td><br>
                    NIS : <td align="center"><% out.println(result2.getString("nis"));%></td><br>
                    NEM : <td align="center"><% out.println(result2.getString("nem"));%></td><br>

                   
                    </tr>
                    <%
                    //int[] temp=siswa.getRANK();
                    for (int idx = 0; idx < siswa.RANK.size(); idx++) {
                            if(nis.equals(siswa.RANK.get(idx).getNis())){

                    
                             %> 
                            RANKING : <td align="center"><% out.println(idx+1);
                            %></td><br><%   
                            }
                                
                        }
                            }
                            statement.close();
                        } catch (Exception ex) {
                            out.println("message: " + ex.getMessage());
                        }
                         %>


                    <br><br><br>
                    <table align="center">
                        <tr>
                            <td>
                                <a href="jurnal.jsp"><input type="button" value="Kembali" style="background: wheat;
                                                            width: 90px; height: 25px;font-family: Arial Black;
                                                            font-size: 14px;"></a>

                            </td>
                        </tr>
                    </table>
                    <br><br><br><br>

                    <font face="verdana" size ="4" font color="white">
                    Download Konfirmasi Pendaftaran </font>
                    <font face="verdana" size ="2" font color="white"><br>
                    <font face="verdana" size ="2" font color="white"> untuk mendownload bukti pendaftaran</font>
                    <a href="javascript:window.print()">Klik Download</a>
                    <br><br><br><br>


                    </html>
